<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <form id="my-form" class="am-form tpl-form-line-form" enctype="multipart/form-data" method="post">
                    <div class="widget-body">
                        <fieldset>
                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl">基础设置</div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">
                                    <span class="tpl-form-line-small-title">站点名称</span>
                                </label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" name="basic[name]"
                                           value="<?= $model['values']['name'] ?>" required>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">
                                    <span class="tpl-form-line-small-title">备案号</span>
                                </label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" name="basic[beian]"
                                           value="<?= $model['values']['beian'] ?>" required>
                                </div>
                            </div>
                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl">公司设置</div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">
                                    <span class="tpl-form-line-small-title">公司名称</span>
                                </label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" name="basic[company_name]"
                                           value="<?= $model['values']['company_name'] ?>">
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">
                                    <span class="tpl-form-line-small-title">公司地址</span>
                                </label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" name="basic[company_address]"
                                           value="<?= $model['values']['company_address'] ?>">
                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">
                                    <span class="tpl-form-line-small-title">联系电话</span>
                                </label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" name="basic[telphone]"
                                           value="<?= $model['values']['telphone'] ?>">

                                </div>
                            </div>
                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require">
                                    <span class="tpl-form-line-small-title">联系QQ</span>
                                </label>
                                <div class="am-u-sm-9">
                                    <input type="text" class="tpl-form-input" name="basic[qq]"
                                           value="<?= $model['values']['qq'] ?>">

                                </div>
                            </div>

                            <!--<div class="am-form-group">-->
                            <!--    <label class="am-u-sm-3 am-form-label form-require">-->
                            <!--        <span class="tpl-form-line-small-title">公众号</span>-->
                            <!--    </label>-->
                            <!--    <div class="am-u-sm-9 am-u-end">-->
                            <!--        <div class="am-form-file">-->
                            <!--            <div class="am-form-file">-->
                            <!--                <button type="button"-->
                            <!--                        class="upload-file am-btn am-btn-secondary am-radius">-->
                            <!--                    <i class="am-icon-cloud-upload"></i> 选择图片-->
                            <!--                </button>-->
                            <!--                <div class="uploader-list am-cf">-->
                            <!--                </div>-->
                                          

                            <!--            </div>-->
                            <!--        </div>-->
                            <!--    </div>-->
                            <!--</div>-->

                            <div class="am-form-group">
                                <label class="am-u-sm-3 am-form-label form-require"> <span class="tpl-form-line-small-title">公司坐标 </span></label>
                                <div class="am-u-sm-9 am-u-end">
                                    <div class="am-block">
                                        <input type="text" style="background: none !important;" id="coordinate"
                                               class="tpl-form-input" name="basic[coordinate]"
                                               placeholder="请选择公司坐标" value="<?= $model['values']['coordinate']?>" readonly="" required>
                                    </div>
                                    <div class="am-block am-padding-top-xs">
                                        <iframe id="map" src="<?= url('general.basic/getpoint') ?>"
                                                width="915"
                                                height="610"></iframe>
                                    </div>
                                </div>
                            </div>
                            <div class="am-form-group">
                                <div class="am-u-sm-9 am-u-sm-push-3 am-margin-top-lg">
                                    <button type="submit" class="j-submit am-btn am-btn-secondary">提交
                                    </button>
                                </div>
                            </div>
                        </fieldset>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>



<!-- 图片文件列表模板 -->
<script id="tpl-file-item" type="text/template">
    {{ each list }}
    <div class="file-item">
        <a href="{{ $value.file_path }}" title="点击查看大图" target="_blank">
            <img src="{{ $value.file_path }}">
        </a>
        <input type="hidden" name="{{ name }}" value="{{ $value.file_id }}">
        <i class="iconfont icon-shanchu file-item-delete"></i>
    </div>
    {{ /each }}
</script>

<!-- 文件库弹窗 -->
{{include file="layouts/_template/file_library" /}}

<script>
    /**
     * 设置坐标
     */
    function setCoordinate(value) {
        var $coordinate = $('#coordinate');
        $coordinate.val(value);
        // 触发验证
        $coordinate.trigger('change');
    }
</script>
<script>

    $(function () {

        // 选择图片
        $('.upload-file').selectImages({
            name: 'basic[wechat_image_id]'
        });

        /**
         * 表单验证提交
         * @type {*}
         */
        $('#my-form').superForm();

    });
</script>




